package com.example.springboottest.example.visitor;

import com.example.springboottest.example.visitor.impl.*;

public class VisitorMain {
    public static void main(String[] args) {
        SwaggerElement swagger = new SwaggerElement();
        swagger.add(new ANodeElement());
        swagger.add(new BNodeElement());
        swagger.add(new CNodeElement());
        //访问者主动发起动作
        swagger.accept(new NodeAVisitor());
    }
}
